package cc.xuzhi.muggle.common.util;

public class DataUtils {

    public static String castStr(Object obj) {
        return isEmpty(obj) ? "" : obj.toString().trim();
    }

    public static boolean isEmpty(Object obj) {
        if (null == obj) {
            return true;
        } else {
            String strTmp = obj.toString().trim();
            return "".equals(strTmp) || "null".equalsIgnoreCase(strTmp);
        }
    }
}
